package com.web;

import com.pojo.OrderInfo;
import com.service.UserInfoService;
import com.service.impl.UserInfoServiceImpl;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.IOException;

public class MedicalServletList extends HttpServlet {

    private UserInfoService userInfoService = new UserInfoServiceImpl();

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        OrderInfo orderInfo1 = userInfoService.queryOrderInfoById(1);
        OrderInfo orderInfo2 = userInfoService.queryOrderInfoById(2);
        OrderInfo orderInfo3 = userInfoService.queryOrderInfoById(3);
        request.setAttribute("orderInfoOne",orderInfo1);
        request.setAttribute("orderInfoTwo",orderInfo2);
        request.setAttribute("orderInfoThree",orderInfo3);
        request.getRequestDispatcher("/login.jsp").forward(request, response);
    }
}
